package com.ruoyi.electricity.service.impl;

import com.ruoyi.electricity.domain.vo.*;
import com.ruoyi.electricity.mapper.ElectricityStatisticsMapper;
import com.ruoyi.electricity.service.ElectricityStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ElectricityStatisticsServiceImpl implements ElectricityStatisticsService {
    @Autowired
    private ElectricityStatisticsMapper electricityStatisticsMapper;

    public List<RegionalElectricityConsumptionRanking> selectRegionalElectricityConsumptionRanking() {
        return electricityStatisticsMapper.selectRegionalElectricityConsumptionRanking();
    }

    @Override
    public List<ElectricityConsumptionAndOutputInTimeDimension> selectDailyElectricityConsumptionAndOutputForCurrentMonth() {
        return electricityStatisticsMapper.selectDailyElectricityConsumptionAndOutputForCurrentMonth();
    }

    @Override
    public List<ElectricityTypePowerConsumption> selectPowerConsumptionOfEachElectricityType() {
        return electricityStatisticsMapper.selectPowerConsumptionOfEachElectricityType();
    }

    @Override
    public List<ElectricityAlarmCountInTimeDimension> selectDailyElectricityAlarmForCurrentMonth() {
        return electricityStatisticsMapper.selectDailyElectricityAlarmForCurrentMonth();
    }

    @Override
    public List<ElectricityAlarmLevelCount> selectNumberOfEachElectricityAlarmLevelForCurrentMonth() {
        return electricityStatisticsMapper.selectNumberOfEachElectricityAlarmLevelForCurrentMonth();
    }

    @Override
    public List<OnlineStatusCount> selectNumberOfEachOnlineStatusForCurrentDay() {
        return electricityStatisticsMapper.selectNumberOfEachOnlineStatusForCurrentDay();
    }

    @Override
    public List<HiddenSateCountInTimeDimension> selectNumberOfEachHiddenSateForCurrentMonth() {
        return electricityStatisticsMapper.selectNumberOfEachHiddenSateForCurrentMonth();
    }

    @Override
    public List<ElectricityDataVo> selectElectricityDataEveryMinuteOfTheDay(String equipCode, Date date) {
        return electricityStatisticsMapper.selectElectricityDataEveryMinuteOfTheDay(equipCode, date);
    }

    @Override
    public List<AlarmsHandleCountForTheDay> countEveryAlarmLevelForTheDay() {
        return electricityStatisticsMapper.countEveryAlarmLevelForTheDay();
    }

    @Override
    public List<EquipSecurityStatusCount> countEquipSecurityStatus() {
        return electricityStatisticsMapper.countEquipSecurityStatus();
    }

    @Override
    public List<AlarmsHandleCountForEachHourOfTheDay> countAlarmsForEachHourOfTheDay() {
        return electricityStatisticsMapper.countAlarmsForEachHourOfTheDay();
    }

    @Override
    public List<PAEnergyCountForTheDay> countPAEnergyForTheDay() {
        return electricityStatisticsMapper.countPAEnergyForTheDay();
    }

    @Override
    public List<PAEnergyForEveryDay> countPAEnergyForEveryDay(Date startTime, Date endTime, String equipCode) {
        return electricityStatisticsMapper.countPAEnergyForEveryDay(startTime, endTime, equipCode);
    }

    @Override
    public List<AlarmsCountForEveryDay> countAlarmsForEveryDay(Date startTime, Date endTime) {
        return electricityStatisticsMapper.countAlarmsForEveryDay(startTime, endTime);
    }

    @Override
    public List<AlarmCountForEachLevel> countAlarmForEachLevel(Date startTime, Date endTime) {
        return electricityStatisticsMapper.countAlarmForEachLevel(startTime, endTime);
    }

    @Override
    public List<ALarmCountForEachEquip> countALarmForEachEquip(Date startTime, Date endTime) {
        return electricityStatisticsMapper.countALarmForEachEquip(startTime, endTime);
    }

    @Override
    public List<MaxAndAvgElectricityVo> selectMaxAndAvgElectricityOfTheDay(String equipCode) {
        return electricityStatisticsMapper.selectMaxAndAvgElectricityOfTheDay(equipCode);
    }

    @Override
    public List<OpenStopOfflineCount> countOpenStopOffline() {
        return electricityStatisticsMapper.countOpenStopOffline();
    }

    @Override
    public List<PAEnergyForEveryDay> countTotalElectricityConsumptionInSevenDays(Integer days) {
        return electricityStatisticsMapper.countTotalElectricityConsumptionInSevenDays(days);
    }

}
